home *** CD-ROM | disk | FTP | other *** search
/ EnigmA Amiga Run 1996 March / EnigmA AMIGA RUN 05 (1996)(G.R. Edizioni)(IT)[!][issue 1996-03][Skylink CD IV].iso / earcd / program / mui32dev.lha / MUI / Developer / Assembler / Examples / MUI-Demo.s
Text File  |  1995-12-17  |  35KB  |  1,106 lines

  1. **
  2. **       Assembler Source Code For The MUI Demo Program
  3. **       ----------------------------------------------
  4. **
  5. **              written 1993 by Henri Veisterä
  6. **
  7. **         (modified from the C code by Stefan Stuntz)
  8. **
  9. ** Even if it doesn't look so, all of the code below is pure Assembler,
  10. ** just a little bit enhanced with some MUI specific macros.
  11. **
  12. ** updated 1995 by Stefan Sommerfeld
  13. **  - added group-backgrounds
  14. **  - fixed enforcer-hits while creating notifies
  15. **  - overall code-cleanup
  16.  
  17.  
  18. MR        EQUR    a4
  19.  
  20.  
  21.         incdir    "include:"
  22.         include    "exec/types.i"
  23.         include    "exec/libraries.i"
  24.         include    "exec/memory.i"
  25.         include    "lvo/exec_lib.i"
  26.  
  27.         include    "lvo/dos_lib.i"
  28.         include    "dos/dosextens.i"
  29.  
  30.         include    "lvo/intuition_lib.i"
  31.  
  32.         include    "libraries/gadtools.i"
  33.  
  34.         include    "lvo/mui_lib.i"
  35.         include    "libraries/mui.i"
  36.  
  37.  
  38. **
  39. ** Some Macros to make my life easier and the actual source
  40. ** code more readable.
  41. **
  42.  
  43.  
  44. Listi MACRO
  45.    ListviewObject
  46.       MUIT MUIA_Weight,50,MUIA_Listview_Input,FALSE,MUIA_Listview_List
  47.       FloattextObject
  48.      MUIT MUIA_Frame,MUIV_Frame_ReadList,MUIA_Floattext_Text,\1,MUIA_Floattext_TabSize,4,MUIA_Floattext_Justify,TRUE
  49.      Endi
  50.       Endi
  51.    ENDM
  52.  
  53.  ; name,id,info
  54. DemoWindow MACRO
  55.    WindowObject
  56.       MUIT MUIA_Window_Title,\1,MUIA_Window_ID,\2,WindowContents
  57.       VGroup
  58.      Childi Listi,\3
  59.    ENDM
  60.  
  61.  
  62.  ; name,nr
  63. ImageLine MACRO
  64.    HGroup
  65.       Childi TextObject
  66.      MUIT MUIA_Text_PreParse,PreParse2,MUIA_Text_Contents,\1,MUIA_FixWidthTxt,rbut1,Endi
  67.       Childi VGroup
  68.      Childi VSpace,0
  69.      Child3 ImageObject,MUIT,MUIA_Image_Spec,\2,Endi
  70.      Childi VSpace,0
  71.      Endi
  72.       Endi
  73.    ENDM
  74.  
  75.  ; nr,s,x,y
  76. ScaledImage MACRO
  77.    ImageObject
  78.       MUIT MUIA_Image_Spec,\1,MUIA_FixWidth,\3,MUIA_FixHeight,\4
  79.       MUIT MUIA_Image_FreeHoriz,TRUE,MUIA_Image_FreeVert,TRUE
  80.       MUIT MUIA_Image_State,\2
  81.       Endi
  82.    ENDM
  83.  
  84. HProp MACRO
  85.    PropObject
  86.       PropFrame
  87.       MUIT MUIA_Prop_Horiz,TRUE,MUIA_FixHeight,8,MUIA_Prop_Entries,111,MUIA_Prop_Visible,10
  88.       Endi
  89.    ENDM
  90.  
  91. VProp MACRO
  92.    PropObject
  93.       PropFrame
  94.       MUIT MUIA_Prop_Horiz,FALSE,MUIA_FixWidth,8,MUIA_Prop_Entries,111,MUIA_Prop_Visible,10
  95.       Endi
  96.    ENDM
  97.  
  98. *** See if we were run from Workbench, if so, get msg and reply to it
  99.  
  100. _main        move.l    4.w,_ExecBase
  101.  
  102.         sub.l    a1,a1
  103.         CALLEXEC FindTask
  104.         move.l    d0,a4
  105.  
  106.         tst.l    pr_CLI(a4)
  107.         beq.s    fromWorkbench
  108.  
  109. *** we were called from the CLI
  110.  
  111.         bra.s    end_startup
  112.  
  113. *** we were called from the Workbench
  114.  
  115. fromWorkbench    lea    pr_MsgPort(a4),a0
  116.         CALLEXEC WaitPort
  117.         lea    pr_MsgPort(a4),a0
  118.         CALLEXEC GetMsg
  119.         move.l    d0,returnMsg
  120.  
  121. *** call our program
  122.  
  123. end_startup    bsr.s    main
  124.  
  125. *** returns to here with exit code in d0
  126.  
  127.         move.l    d0,-(sp)
  128.  
  129.         tst.l    returnMsg
  130.         beq.s    exitToDOS
  131.  
  132.         CALLEXEC Forbid
  133.         move.l    returnMsg(pc),a1
  134.         CALLEXEC ReplyMsg
  135.  
  136. exitToDOS    move.l    (sp)+,d0
  137.         rts
  138.  
  139. *** Open all libraries
  140.  
  141. main        lea    dosname(pc),a1
  142.         move.l    #36,d0
  143.         CALLEXEC OpenLibrary
  144.         move.l    d0,_DOSBase
  145.         beq    end
  146.  
  147.         lea    muimname(pc),a1
  148.         move.l    #MUIMASTER_VMIN,d0
  149.         CALLEXEC OpenLibrary
  150.         move.l    d0,_MUIMasterBase
  151.         beq    closedos
  152.  
  153.         lea    intname(pc),a1
  154.         move.l    #37,d0
  155.         CALLEXEC OpenLibrary
  156.         move.l    d0,_IntuitionBase
  157.         beq    closemui
  158.  
  159. *** Allocate space for tagitems.  Your program gets the maximum
  160. *** tagspace usage in bytes in the variable TAG_SPACE.
  161. *** Allocated space must be passed in the address register MR.
  162.  
  163.  
  164.         move.l    tagspace(pc),d0
  165.         move.l    #MEMF_ANY,d1
  166.         CALLEXEC AllocMem
  167.         move.l    d0,tag_mem
  168.         beq    closeint
  169.         move.l    d0,MR
  170.  
  171.  
  172. **
  173. ** Every MUI application needs an application object
  174. ** which will hold general information and serve as
  175. ** a kind of anchor for user input, ARexx functions,
  176. ** commodities interface, etc.
  177. **
  178. ** An application may have any number of SubWindows
  179. ** which can all be created in the same call or added
  180. ** later, according to your needs.
  181. **
  182. ** Note that creating a window does not mean to
  183. ** open it, this will be done later by setting
  184. ** the windows open attribute.
  185. **
  186.  
  187.         ApplicationObject
  188.            MUIT MUIA_Application_Title,titl1
  189.            MUIT MUIA_Application_Version,vers1
  190.            MUIT MUIA_Application_Copyright,copy1
  191.            MUIT MUIA_Application_Author,auth1
  192.            MUIT MUIA_Application_Description,desc1
  193.            MUIT MUIA_Application_Base,base1
  194.            MUIT MUIA_Application_Menu,MyMenus
  195.  
  196.            SubWindowi
  197.               DemoWindow stri1,"STRG",IN_String
  198.              Childi ListviewObject
  199.                 MUIT MUIA_Listview_Input,TRUE,MUIA_Listview_List
  200.                 ListObject
  201.                    InputListFrame
  202.                    Endi
  203.                 Endi
  204.                 is LV_Brian
  205.              Child2 StringObject,StringFrame,Endi
  206.              is ST_Brian
  207.              Endi
  208.               Endi
  209.               is WI_String
  210.  
  211.            SubWindowi
  212.               DemoWindow cycl1,"CYCL",IN_Cycle
  213.              Childi HGroup
  214.                 Childi Radio,comp1,CYA_Computer
  215.                 is MT_Computer
  216.                 Childi VGroup
  217.                    Childi Radio,prin1,CYA_Printer
  218.                    is MT_Printer
  219.                    Childi VSpace,0
  220.                    Childi Radio,disp1,CYA_Display
  221.                    is MT_Display
  222.                    Endi
  223.                 Childi VGroup
  224.                    Childi ColGroup,2
  225.                   MUIT MUIA_Background,MUII_GroupBack
  226.                   GroupFrameT cycl2
  227.                   Childi Label1,comp2
  228.                   Childi KeyCycle,CYA_Computer,"c"
  229.                   is CY_Computer
  230.                   Childi Label1,prin2
  231.                   Childi KeyCycle,CYA_Printer,"p"
  232.                   is CY_Printer
  233.                   Childi Label1,disp2
  234.                   Childi KeyCycle,CYA_Display,"d"
  235.                   is CY_Display
  236.                   Endi
  237.                    Childi ListviewObject
  238.                   MUIT MUIA_Listview_Input,TRUE
  239.                   MUIT MUIA_Listview_List
  240.                   ListObject
  241.                      InputListFrame
  242.                      Endi
  243.                       Endi
  244.                       is LV_Computer
  245.                    Endi
  246.                 Endi
  247.              Endi
  248.               Endi
  249.               is WI_Cycle
  250.  
  251.            SubWindowi
  252.               DemoWindow list1,"LIST",IN_Listviews
  253.              Childi HGroup
  254.                 GroupFrameT dire1
  255.                 MUIT MUIA_Background,MUII_GroupBack
  256.                 Childi ListviewObject
  257.                    MUIT MUIA_Listview_Input,TRUE
  258.                    MUIT MUIA_Listview_MultiSelect,TRUE
  259.                    MUIT MUIA_Listview_List
  260.                    DirlistObject
  261.                   InputListFrame
  262.                   MUIT MUIA_Dirlist_Directory,ram1,Endi
  263.                    Endi
  264.                    is LV_Directory
  265.                 Childi ListviewObject
  266.                    MUIT MUIA_Weight,20
  267.                    MUIT MUIA_Listview_Input,TRUE
  268.                    MUIT MUIA_Listview_List
  269.                    VolumelistObject
  270.                   InputListFrame
  271.                   MUIT MUIA_Dirlist_Directory,ram1,Endi
  272.                    Endi
  273.                    is LV_Volumes
  274.                 Endi
  275.              Endi
  276.               Endi
  277.               is WI_Listviews
  278.  
  279.            SubWindowi
  280.               DemoWindow noti1,"BRCA",IN_Notify
  281.              Childi HGroup
  282.                 MUIT MUIA_Background,MUII_GroupBack
  283.                 GroupFrameT conn1
  284.                 Child2 GaugeObject,GaugeFrame
  285.                    MUIT MUIA_Gauge_Horiz,FALSE,MUIA_FixWidth,16,Endi
  286.                    is GA_Gauge1
  287.                 Childi VProp
  288.                 is PR_PropL
  289.                 Childi VProp
  290.                 is PR_PropR
  291.                 Childi VGroup
  292.                    Childi VSpace,0
  293.                    Childi HProp
  294.                    is PR_PropA
  295.                    Childi HGroup
  296.                   Childi HProp
  297.                   is PR_PropH
  298.                   Childi HProp
  299.                   is PR_PropV
  300.                   Endi
  301.                    Childi VSpace,0
  302.                    Childi VGroup
  303.                   GroupSpacing 1
  304.                   Child2 GaugeObject,GaugeFrame
  305.                      MUIT MUIA_Gauge_Horiz,TRUE,Endi
  306.                      is GA_Gauge2
  307.                   Child3 ScaleObject,MUIT,MUIA_Scale_Horiz,TRUE,Endi
  308.                   Endi
  309.                    Childi VSpace,0
  310.                    Endi
  311.                 Childi VProp
  312.                 is PR_PropT
  313.                 Childi VProp
  314.                 is PR_PropB
  315.                 Child2 GaugeObject,GaugeFrame
  316.                    MUIT MUIA_Gauge_Horiz,FALSE,MUIA_FixWidth,16,Endi
  317.                    is GA_Gauge3
  318.                 Endi
  319.              Endi
  320.               Endi
  321.               is WI_Notify
  322.  
  323.            SubWindowi
  324.               DemoWindow back1,"BACK",IN_Backfill
  325.              Childi VGroup
  326.                 MUIT MUIA_Background,MUII_GroupBack
  327.                 GroupFrameT stan1
  328.                 Childi HGroup
  329.                    Child2 RectangleObject,TextFrame
  330.                       MUIT MUIA_Background,MUII_BACKGROUND,Endi
  331.                        Child2 RectangleObject,TextFrame
  332.                           MUIT MUIA_Background,MUII_FILL,Endi
  333.                        Child2 RectangleObject,TextFrame
  334.                           MUIT MUIA_Background,MUII_SHADOW,Endi
  335.                    Endi
  336.                 Childi HGroup
  337.                        Child2 RectangleObject,TextFrame
  338.                           MUIT MUIA_Background,MUII_SHADOWBACK,Endi
  339.                        Child2 RectangleObject,TextFrame
  340.                           MUIT MUIA_Background,MUII_SHADOWFILL,Endi
  341.                        Child2 RectangleObject,TextFrame
  342.                           MUIT MUIA_Background,MUII_SHADOWSHINE,Endi
  343.                    Endi
  344.                 Childi HGroup
  345.                        Child2 RectangleObject,TextFrame
  346.                           MUIT MUIA_Background,MUII_FILLBACK,Endi
  347.                        Child2 RectangleObject,TextFrame
  348.                           MUIT MUIA_Background,MUII_SHINEBACK,Endi
  349.                        Child2 RectangleObject,TextFrame
  350.                           MUIT MUIA_Background,MUII_FILLSHINE,Endi
  351.                    Endi
  352.                 Endi
  353.              Endi
  354.               Endi
  355.               is WI_Backfill
  356.  
  357.            SubWindowi
  358.               DemoWindow grou1,"GRPS",IN_Groups
  359.              Child3 HGroup,GroupFrameT,grou2
  360.                 MUIT MUIA_Background,MUII_GroupBack
  361.                 Child3 HGroup,GroupFrameT,hori1
  362.                    Child2 RectangleObject,TextFrame,Endi
  363.                    Child2 RectangleObject,TextFrame,Endi
  364.                    Child2 RectangleObject,TextFrame,Endi
  365.                    Endi
  366.                 Child3 VGroup,GroupFrameT,vert1
  367.                    Child2 RectangleObject,TextFrame,Endi
  368.                    Child2 RectangleObject,TextFrame,Endi
  369.                    Child2 RectangleObject,TextFrame,Endi
  370.                    Endi
  371.                 Childi ColGroup,3
  372.                    GroupFrameT arra1
  373.                    Child2 RectangleObject,TextFrame,Endi
  374.                    Child2 RectangleObject,TextFrame,Endi
  375.                    Child2 RectangleObject,TextFrame,Endi
  376.                    Child2 RectangleObject,TextFrame,Endi
  377.                    Child2 RectangleObject,TextFrame,Endi
  378.                    Child2 RectangleObject,TextFrame,Endi
  379.                    Child2 RectangleObject,TextFrame,Endi
  380.                    Child2 RectangleObject,TextFrame,Endi
  381.                    Endi
  382.                 Endi
  383.              Child3 HGroup,GroupFrameT,diff1
  384.                 MUIT MUIA_Background,MUII_GroupBack
  385.                 Child2 TextObject,TextFrame
  386.                    MUIT MUIA_Background,MUII_TextBack,MUIA_Text_Contents,kg25,MUIA_Weight,25,Endi
  387.                 Child2 TextObject,TextFrame
  388.                    MUIT MUIA_Background,MUII_TextBack,MUIA_Text_Contents,kg50,MUIA_Weight,50,Endi
  389.                 Child2 TextObject,TextFrame
  390.                    MUIT MUIA_Background,MUII_TextBack,MUIA_Text_Contents,kg75,MUIA_Weight,75,Endi
  391.                 Child2 TextObject,TextFrame
  392.                    MUIT MUIA_Background,MUII_TextBack,MUIA_Text_Contents,kg100,MUIA_Weight,100,Endi
  393.                 Endi
  394.              Child3 HGroup,GroupFrameT,fixe1
  395.                 MUIT MUIA_Background,MUII_GroupBack
  396.                 Child2 TextObject,TextFrame
  397.                    MUIT MUIA_Background,MUII_TextBack,MUIA_Text_Contents,fixe2,MUIA_Text_SetMax,TRUE,Endi
  398.                 Child2 TextObject,TextFrame
  399.                    MUIT MUIA_Background,MUII_TextBack,MUIA_Text_Contents,free1,MUIA_Text_SetMax,FALSE,Endi
  400.                 Child2 TextObject,TextFrame
  401.                    MUIT MUIA_Background,MUII_TextBack,MUIA_Text_Contents,fixe2,MUIA_Text_SetMax,TRUE,Endi
  402.                 Child2 TextObject,TextFrame
  403.                    MUIT MUIA_Background,MUII_TextBack,MUIA_Text_Contents,free1,MUIA_Text_SetMax,FALSE,Endi
  404.                 Child2 TextObject,TextFrame
  405.                    MUIT MUIA_Background,MUII_TextBack,MUIA_Text_Contents,fixe2,MUIA_Text_SetMax,TRUE,Endi
  406.                 Endi
  407.              Endi
  408.               Endi
  409.               is WI_Groups
  410.  
  411.            SubWindowi
  412.               DemoWindow fram1,"FRMS",IN_Frames
  413.                  Childi ColGroup,2
  414.                 Child2 TextObject,ButtonFrame
  415.                    MUIT MUIA_Background,MUII_TextBack,MUIA_Text_Contents,butt1,Endi
  416.                 Child2 TextObject,ImageButtonFrame
  417.                    MUIT MUIA_Background,MUII_TextBack,MUIA_Text_Contents,imag1,Endi
  418.                 Child2 TextObject,TextFrame
  419.                    MUIT MUIA_Background,MUII_TextBack,MUIA_Text_Contents,text1,Endi
  420.                 Child2 TextObject,StringFrame
  421.                    MUIT MUIA_Background,MUII_TextBack,MUIA_Text_Contents,stri2,Endi
  422.                 Child2 TextObject,ReadListFrame
  423.                    MUIT MUIA_Background,MUII_TextBack,MUIA_Text_Contents,read1,Endi
  424.                 Child2 TextObject,InputListFrame
  425.                    MUIT MUIA_Background,MUII_TextBack,MUIA_Text_Contents,inpu1,Endi
  426.                 Child2 TextObject,PropFrame
  427.                    MUIT MUIA_Background,MUII_TextBack,MUIA_Text_Contents,prop1,Endi
  428.                 Child2 TextObject,GroupFrame
  429.                    MUIT MUIA_Background,MUII_TextBack,MUIA_Text_Contents,grou3,Endi
  430.                 Endi
  431.              Endi
  432.               Endi
  433.               is WI_Frames
  434.  
  435.            SubWindowi
  436.               DemoWindow imag2,"IMGS",IN_Images
  437.                  Childi HGroup
  438.                 Child3 VGroup,GroupFrameT,stan2
  439.                    MUIT MUIA_Background,MUII_GroupBack
  440.                    Childi ImageLine,arro1,MUII_ArrowUp
  441.                    Childi ImageLine,arro2,MUII_ArrowDown
  442.                    Childi ImageLine,arro3,MUII_ArrowLeft
  443.                    Childi ImageLine,arro4,MUII_ArrowRight
  444.                    Childi ImageLine,radi1,MUII_RadioButton
  445.                    Childi ImageLine,file1,MUII_PopFile
  446.                    Childi ImageLine,hard1,MUII_HardDisk
  447.                    Childi ImageLine,disk1,MUII_Disk
  448.                    Childi ImageLine,chip1,MUII_Chip
  449.                    Childi ImageLine,draw1,MUII_Drawer
  450.                    Endi
  451.                 Child3 VGroup,GroupFrameT,scal1
  452.                    MUIT MUIA_Background,MUII_GroupBack
  453.                    Childi VSpace,0
  454.                    Childi HGroup
  455.                   Childi ScaledImage,MUII_RadioButton,1,17,9
  456.                   Childi ScaledImage,MUII_RadioButton,1,20,12
  457.                   Childi ScaledImage,MUII_RadioButton,1,23,15
  458.                   Childi ScaledImage,MUII_RadioButton,1,26,18
  459.                   Childi ScaledImage,MUII_RadioButton,1,29,21
  460.                   Endi
  461.                    Childi VSpace,0
  462.                    Childi HGroup
  463.                   Childi ScaledImage,MUII_CheckMark,1,13,7
  464.                   Childi ScaledImage,MUII_CheckMark,1,16,10
  465.                   Childi ScaledImage,MUII_CheckMark,1,19,13
  466.                   Childi ScaledImage,MUII_CheckMark,1,22,16
  467.                   Childi ScaledImage,MUII_CheckMark,1,25,19
  468.                   Childi ScaledImage,MUII_CheckMark,1,28,22
  469.                   Endi
  470.                    Childi VSpace,0
  471.                    Childi HGroup
  472.                   Childi ScaledImage,MUII_PopFile,0,12,10
  473.                   Childi ScaledImage,MUII_PopFile,0,15,13
  474.                   Childi ScaledImage,MUII_PopFile,0,18,16
  475.                   Childi ScaledImage,MUII_PopFile,0,21,19
  476.                   Childi ScaledImage,MUII_PopFile,0,24,22
  477.                   Childi ScaledImage,MUII_PopFile,0,27,25
  478.                   Endi
  479.                    Childi VSpace,0
  480.                    Endi
  481.                 Endi
  482.              Endi
  483.               Endi
  484.               is WI_Images
  485.  
  486.            SubWindowi
  487.               WindowObject
  488.               MUIT MUIA_Window_Title,titl1
  489.               MUIT MUIA_Window_ID,"MAIN",WindowContents
  490.               VGroup
  491.              Child2 TextObject,GroupFrame
  492.                 MUIT MUIA_Background,MUII_SHADOWFILL
  493.                 MUIT MUIA_Text_Contents,tcon1,Endi
  494.  
  495.              Childi Listi,IN_Master
  496.  
  497.              Childi VGroup
  498.                 GroupFrameT avad1
  499.                 MUIT MUIA_Background,MUII_GroupBack
  500.                 Childi HGroup
  501.                    MUIT MUIA_Group_SameWidth,TRUE
  502.                    Childi KeyButton,grou4,"g"
  503.                    is BT_Groups
  504.                    Childi KeyButton,fram2,"f"
  505.                    is BT_Frames
  506.                    Childi KeyButton,back2,"b"
  507.                    is BT_Backfill
  508.                    Endi
  509.                 Childi HGroup
  510.                    MUIT MUIA_Group_SameWidth,TRUE
  511.                    Childi KeyButton,noti2,"n"
  512.                    is BT_Notify
  513.                    Childi KeyButton,list2,"l"
  514.                    is BT_Listviews
  515.                    Childi KeyButton,cycl3,"c"
  516.                    is BT_Cycle
  517.                    Endi
  518.                 Childi HGroup
  519.                    MUIT MUIA_Group_SameWidth,TRUE
  520.                    Childi KeyButton,imag3,"i"
  521.                    is BT_Images
  522.                    Childi KeyButton,stri3,"s"
  523.                    is BT_String
  524.                    Childi KeyButton,quit1,"q"
  525.                    is BT_Quit
  526.                    Endi
  527.                 Endi
  528.              Endi
  529.               Endi
  530.               is WI_Master
  531.  
  532.            Endi
  533.            is AP_Demo
  534.  
  535.  
  536. **
  537. ** See if the application was created. The fail function
  538. ** deletes every created object and closes everything.
  539. **
  540. ** Note that we do not need any
  541. ** error control for the sub objects since every error
  542. ** will automatically be forwarded to the parent object
  543. ** and cause this one to fail too.
  544. **
  545.  
  546.         tst.l    AP_Demo
  547.         beq    fail
  548.  
  549.  
  550. **
  551. ** Here comes the broadcast magic. Notifying means:
  552. ** When an attribute of an object changes, then please change
  553. ** another attribute of another object (accordingly) or send
  554. ** a method to another object.
  555. **
  556.  
  557. **
  558. ** Lets bind the sub windows to the corresponding button
  559. ** of the master window.
  560. **
  561.  
  562.     DoMethod BT_Frames,#MUIM_Notify,#MUIA_Pressed,#FALSE,WI_Frames,#3,#MUIM_Set,#MUIA_Window_Open,#TRUE
  563.     DoMethod BT_Images,#MUIM_Notify,#MUIA_Pressed,#FALSE,WI_Images,#3,#MUIM_Set,#MUIA_Window_Open,#TRUE
  564.     DoMethod BT_Notify,#MUIM_Notify,#MUIA_Pressed,#FALSE,WI_Notify,#3,#MUIM_Set,#MUIA_Window_Open,#TRUE
  565.     DoMethod BT_Listviews,#MUIM_Notify,#MUIA_Pressed,#FALSE,WI_Listviews,#3,#MUIM_Set,#MUIA_Window_Open,#TRUE
  566.     DoMethod BT_Groups,#MUIM_Notify,#MUIA_Pressed,#FALSE,WI_Groups,#3,#MUIM_Set,#MUIA_Window_Open,#TRUE
  567.     DoMethod BT_Backfill,#MUIM_Notify,#MUIA_Pressed,#FALSE,WI_Backfill,#3,#MUIM_Set,#MUIA_Window_Open,#TRUE
  568.     DoMethod BT_Cycle,#MUIM_Notify,#MUIA_Pressed,#FALSE,WI_Cycle,#3,#MUIM_Set,#MUIA_Window_Open,#TRUE
  569.     DoMethod BT_String,#MUIM_Notify,#MUIA_Pressed,#FALSE,WI_String,#3,#MUIM_Set,#MUIA_Window_Open,#TRUE
  570.  
  571.     DoMethod BT_Quit,#MUIM_Notify,#MUIA_Pressed,#FALSE,AP_Demo,#2,#MUIM_Application_ReturnID,#MUIV_Application_ReturnID_Quit
  572.  
  573.  
  574. **
  575. ** Automagically remove a window when the user hits the close gadget.
  576. **
  577.  
  578.     DoMethod WI_Images,#MUIM_Notify,#MUIA_Window_CloseRequest,#TRUE,WI_Images,#3,#MUIM_Set,#MUIA_Window_Open,#FALSE
  579.     DoMethod WI_Frames,#MUIM_Notify,#MUIA_Window_CloseRequest,#TRUE,WI_Frames,#3,#MUIM_Set,#MUIA_Window_Open,#FALSE
  580.     DoMethod WI_Notify,#MUIM_Notify,#MUIA_Window_CloseRequest,#TRUE,WI_Notify,#3,#MUIM_Set,#MUIA_Window_Open,#FALSE
  581.     DoMethod WI_Listviews,#MUIM_Notify,#MUIA_Window_CloseRequest,#TRUE,WI_Listviews,#3,#MUIM_Set,#MUIA_Window_Open,#FALSE
  582.     DoMethod WI_Groups,#MUIM_Notify,#MUIA_Window_CloseRequest,#TRUE,WI_Groups,#3,#MUIM_Set,#MUIA_Window_Open,#FALSE
  583.     DoMethod WI_Backfill,#MUIM_Notify,#MUIA_Window_CloseRequest,#TRUE,WI_Backfill,#3,#MUIM_Set,#MUIA_Window_Open,#FALSE
  584.     DoMethod WI_Cycle,#MUIM_Notify,#MUIA_Window_CloseRequest,#TRUE,WI_Cycle,#3,#MUIM_Set,#MUIA_Window_Open,#FALSE
  585.     DoMethod WI_String,#MUIM_Notify,#MUIA_Window_CloseRequest,#TRUE,WI_String,#3,#MUIM_Set,#MUIA_Window_Open,#FALSE
  586.  
  587.  
  588. **
  589. ** Closing the master window forces a complete shutdown of the application.
  590. **
  591.  
  592.     DoMethod WI_Master,#MUIM_Notify,#MUIA_Window_CloseRequest,#TRUE,AP_Demo,#2,#MUIM_Application_ReturnID,#MUIV_Application_ReturnID_Quit
  593.  
  594.  
  595. **
  596. ** This connects the prop gadgets in the broadcast demo window.
  597. **
  598.  
  599.     DoMethod PR_PropA,#MUIM_Notify,#MUIA_Prop_First,#MUIV_EveryTime,PR_PropH,#3,#MUIM_Set,#MUIA_Prop_First,#MUIV_TriggerValue
  600.     DoMethod PR_PropA,#MUIM_Notify,#MUIA_Prop_First,#MUIV_EveryTime,PR_PropV,#3,#MUIM_Set,#MUIA_Prop_First,#MUIV_TriggerValue
  601.     DoMethod PR_PropH,#MUIM_Notify,#MUIA_Prop_First,#MUIV_EveryTime,PR_PropL,#3,#MUIM_Set,#MUIA_Prop_First,#MUIV_TriggerValue
  602.     DoMethod PR_PropH,#MUIM_Notify,#MUIA_Prop_First,#MUIV_EveryTime,PR_PropR,#3,#MUIM_Set,#MUIA_Prop_First,#MUIV_TriggerValue
  603.     DoMethod PR_PropV,#MUIM_Notify,#MUIA_Prop_First,#MUIV_EveryTime,PR_PropT,#3,#MUIM_Set,#MUIA_Prop_First,#MUIV_TriggerValue
  604.     DoMethod PR_PropV,#MUIM_Notify,#MUIA_Prop_First,#MUIV_EveryTime,PR_PropB,#3,#MUIM_Set,#MUIA_Prop_First,#MUIV_TriggerValue
  605.  
  606.     DoMethod PR_PropA,#MUIM_Notify,#MUIA_Prop_First,#MUIV_EveryTime,GA_Gauge2,#3,#MUIM_Set,#MUIA_Gauge_Current,#MUIV_TriggerValue
  607.     DoMethod GA_Gauge2,#MUIM_Notify,#MUIA_Gauge_Current,#MUIV_EveryTime,GA_Gauge1,#3,#MUIM_Set,#MUIA_Gauge_Current,#MUIV_TriggerValue
  608.     DoMethod GA_Gauge2,#MUIM_Notify,#MUIA_Gauge_Current,#MUIV_EveryTime,GA_Gauge3,#3,#MUIM_Set,#MUIA_Gauge_Current,#MUIV_TriggerValue
  609.  
  610.  
  611. **
  612. ** And here we connect cycle gadgets, radio buttons and the list in the
  613. ** cycle & radio window.
  614. **
  615.  
  616.     DoMethod CY_Computer,#MUIM_Notify,#MUIA_Cycle_Active,#MUIV_EveryTime,MT_Computer,#3,#MUIM_Set,#MUIA_Radio_Active,#MUIV_TriggerValue
  617.     DoMethod CY_Printer,#MUIM_Notify,#MUIA_Cycle_Active,#MUIV_EveryTime,MT_Printer,#3,#MUIM_Set,#MUIA_Radio_Active,#MUIV_TriggerValue
  618.     DoMethod CY_Display,#MUIM_Notify,#MUIA_Cycle_Active,#MUIV_EveryTime,MT_Display,#3,#MUIM_Set,#MUIA_Radio_Active,#MUIV_TriggerValue
  619.     DoMethod MT_Computer,#MUIM_Notify,#MUIA_Radio_Active,#MUIV_EveryTime,CY_Computer,#3,#MUIM_Set,#MUIA_Cycle_Active,#MUIV_TriggerValue
  620.     DoMethod MT_Printer,#MUIM_Notify,#MUIA_Radio_Active,#MUIV_EveryTime,CY_Printer,#3,#MUIM_Set,#MUIA_Cycle_Active,#MUIV_TriggerValue
  621.     DoMethod MT_Display,#MUIM_Notify,#MUIA_Radio_Active,#MUIV_EveryTime,CY_Display,#3,#MUIM_Set,#MUIA_Cycle_Active,#MUIV_TriggerValue
  622.     DoMethod MT_Computer,#MUIM_Notify,#MUIA_Radio_Active,#MUIV_EveryTime,LV_Computer,#3,#MUIM_Set,#MUIA_List_Active,#MUIV_TriggerValue
  623.     DoMethod LV_Computer,#MUIM_Notify,#MUIA_List_Active ,#MUIV_EveryTime,MT_Computer,#3,#MUIM_Set,#MUIA_Radio_Active,#MUIV_TriggerValue
  624.  
  625.  
  626. **
  627. ** This one makes us receive input ids from several list views.
  628. **
  629.  
  630.     DoMethod LV_Volumes,#MUIM_Notify,#MUIA_Listview_DoubleClick,#TRUE,AP_Demo,#2,#MUIM_Application_ReturnID,#ID_NEWVOL
  631.     DoMethod LV_Brian,#MUIM_Notify,#MUIA_List_Active,#MUIV_EveryTime,AP_Demo,#2,#MUIM_Application_ReturnID,#ID_NEWBRI
  632.  
  633.  
  634. **
  635. ** Now lets set the TAB cycle chain for some of our windows.
  636. **
  637.  
  638.     DoMethod WI_Master,#MUIM_Window_SetCycleChain,BT_Groups,BT_Frames,BT_Backfill,BT_Notify,BT_Listviews,BT_Cycle,BT_Images,BT_String,#NULL
  639.     DoMethod WI_Listviews,#MUIM_Window_SetCycleChain,LV_Directory,LV_Volumes,#NULL
  640.     DoMethod WI_Cycle,#MUIM_Window_SetCycleChain,MT_Computer,MT_Printer,MT_Display,CY_Computer,CY_Printer,CY_Display,LV_Computer,#NULL
  641.     DoMethod WI_String,#MUIM_Window_SetCycleChain,ST_Brian,#NULL
  642.  
  643.  
  644. **
  645. ** Set some start values for certain objects.
  646. **
  647.  
  648.     DoMethod LV_Computer,#MUIM_List_Insert,#CYA_Computer,#-1,#MUIV_List_Insert_Bottom
  649.     DoMethod LV_Brian,#MUIM_List_Insert,#LVT_Brian,#-1,#MUIV_List_Insert_Bottom
  650.     seti LV_Computer,#MUIA_List_Active,#0
  651.     seti LV_Brian,#MUIA_List_Active,#0
  652.     seti ST_Brian,#MUIA_String_AttachedList,LV_Brian
  653.  
  654.  
  655. **
  656. ** Everything's ready, lets launch the application. We will
  657. ** open the master window now.
  658. **
  659.  
  660.     seti WI_Master,#MUIA_Window_Open,#TRUE
  661.  
  662.  
  663. **
  664. ** This is the main loop. As you can see, it does just nothing.
  665. ** Everything is handled by MUI, no work for the programmer.
  666. **
  667. ** The only thing we do here is to react on a double click
  668. ** in the volume list (which causes an ID_NEWVOL) by setting
  669. ** a new directory name for the directory list. If you want
  670. ** to see a real file requester with MUI, wait for the
  671. ** next release of MFR :-)
  672. **
  673.  
  674. main_loop    DoMethod AP_Demo,#MUIM_Application_Input,#signal
  675.  
  676.         cmp.l    #MUIV_Application_ReturnID_Quit,d0
  677.         bne    switch1
  678.         move.w    #FALSE,running
  679.         bra    quit_now
  680.  
  681. switch1        cmp.l    #ID_NEWVOL,d0
  682.         bne    switch2
  683.         DoMethod LV_Volumes,#MUIM_List_GetEntry,#MUIV_List_GetEntry_Active,#buf
  684.         seti LV_Directory,#MUIA_Dirlist_Directory,buf
  685.         bra    switch4
  686.  
  687. switch2        cmp.l    #ID_NEWBRI,d0
  688.         bne    switch3
  689.         geti LV_Brian,#MUIA_List_Active,#buf
  690.         move.l    #LVT_Brian,a0
  691.         move.l    buf(pc),d0
  692.         asl.l    #2,d0
  693.         move.l    (a0,d0.l),d0
  694.         seti ST_Brian,#MUIA_String_Contents,d0
  695.         bra    switch4
  696.  
  697. switch3        cmp.l    #ID_ABOUT,d0
  698.         bne    switch4
  699.         MUI_Request AP_Demo,WI_Master,0,NULL,gads1,muid1
  700.         
  701. switch4        move.l    signal(pc),d0
  702.         beq    main_loop
  703.         CALLEXEC Wait
  704.         bra    main_loop
  705.  
  706. quit_now    move.l    #0,error
  707.         bra.s    freemem
  708.  
  709. fail        CALLMUI MUI_Error
  710.         move.w    d0,muierror
  711.  
  712.         move.l   #erro1,d1
  713.         move.l   #muierror,d2
  714.         CALLDOS VPrintf
  715.  
  716. freemem        tst.l    tag_mem
  717.         beq.s    freeobj
  718.         move.l    tagspace(pc),d0
  719.         move.l    tag_mem(pc),a1
  720.         CALLEXEC FreeMem
  721.  
  722. freeobj        tst.l    AP_Demo
  723.         beq.s    closeint
  724.         move.l    AP_Demo(pc),a0
  725.         CALLMUI MUI_DisposeObject
  726.  
  727. closeint    tst.l    _IntuitionBase
  728.         beq.s    closemui
  729.         move.l    _IntuitionBase(pc),a1
  730.         CALLEXEC CloseLibrary
  731.  
  732. closemui    tst.l    _MUIMasterBase
  733.         beq.s    closedos
  734.         move.l    _MUIMasterBase(pc),a1
  735.         CALLEXEC CloseLibrary
  736.  
  737. closedos    tst.l    _DOSBase
  738.         beq.s    end
  739.         move.l    _DOSBase(pc),a1
  740.         CALLEXEC CloseLibrary
  741.  
  742. end        move.l    error(pc),d0
  743.         rts
  744.  
  745.  
  746. _DoMethod:            ;Standart-Function !! DON'T REMOVE !!
  747.     move.l    a2,-(a7)
  748.     move.l    (a3),a2
  749.     tst.l    (a3)
  750.     beq.s    .do
  751.     lea    4(a3),a1
  752.     move.l    -4(a2),a0
  753.     move.l    8(a0),a6
  754.     jsr    (a6)
  755.     move.l    (a7)+,a2
  756.     rts
  757. .do:    moveq    #0,d0
  758.     move.l    (a7)+,a2
  759.     rts
  760.  
  761. *** Library bases
  762.  
  763. _ExecBase    dc.l    0
  764. _DOSBase    dc.l    0
  765. _IntuitionBase    dc.l    0
  766. _MUIMasterBase    dc.l    0
  767.  
  768. *** Library names
  769.  
  770. dosname        dc.b    "dos.library",0
  771. muimname    MUIMASTER_NAME
  772. intname        dc.b    "intuition.library",0
  773.  
  774.     cnop    0,4
  775.  
  776. *** Misc. vars
  777.  
  778. returnMsg    dc.l    0
  779. error        dc.l    20
  780. signal        dc.l    0
  781. muierror    dc.w    0
  782. running        dc.w    0
  783. buf        dc.l    0
  784. tag_mem        dc.l    0
  785.  
  786. *** The place to store TAG_SPACE _must_ be after all MUI creation macros.
  787. *** Note: This depends on the order of compilation.  As the MUI macros
  788. *** are compiled, the TAG_SPACE variable is increased.  When we reach
  789. *** this position it has some meaningfull value.
  790.  
  791. tagspace    dc.l    TAG_SPACE
  792.  
  793. ** Misc strings
  794.  
  795. rbut1        dc.b    "RadioButton:",0
  796. base1        dc.b    "MUIDEMO",0
  797. desc1        dc.b    "Demonstrate the features of MUI.",0
  798. auth1        dc.b    "Stefan Stuntz",0
  799. copy1        dc.b    "Copyright ©1992-95, Stefan Stuntz",0
  800. vers1        dc.b    "$VER: MUI-Demo 4.4 (08.08.93)",0
  801. titl1        dc.b    "MUI-Demo",0
  802. stri1        dc.b    "String",0
  803. cycl1        dc.b    "Cycle Gadgets & RadioButtons",0
  804. comp1        dc.b    "Computer:",0
  805. prin1        dc.b    "Printer:",0
  806. disp1        dc.b    "Display:",0
  807. cycl2        dc.b    "Cycle Gadgets",0
  808. comp2        dc.b    "Computer:",0
  809. prin2        dc.b    "Printer:",0
  810. disp2        dc.b    "Display:",0
  811. list1        dc.b    "Listviews",0
  812. dire1        dc.b    "Dir & Volume List",0
  813. ram1        dc.b    "ram:",0
  814. noti1        dc.b    "Notifying",0
  815. conn1        dc.b    "Connections",0
  816. back1        dc.b    "Backfill",0
  817. stan1        dc.b    "Standard Backgrounds",0
  818. grou1        dc.b    "Groups",0
  819. grou2        dc.b    "Group Types",0
  820. hori1        dc.b    "Horizontal",0
  821. vert1        dc.b    "Vertical",0
  822. arra1        dc.b    "Array",0
  823. diff1        dc.b    "Different Weights",0
  824. kg25        dc.b    27,"c25 kg",0
  825. kg50        dc.b    27,"c50 kg",0
  826. kg75        dc.b    27,"c75 kg",0
  827. kg100        dc.b    27,"c100 kg",0
  828. fixe1        dc.b    "Fixed & Variable Sizes",0
  829. fixe2        dc.b    "fixed",0
  830. free1        dc.b    27,"cfree",0
  831. fram1        dc.b    "Frames",0
  832. butt1        dc.b    27,"cButton",0
  833. imag1        dc.b    27,"cImageButton",0
  834. text1        dc.b    27,"cText",0
  835. stri2        dc.b    27,"cString",0
  836. read1        dc.b    27,"cReadList",0
  837. inpu1        dc.b    27,"cInputList",0
  838. prop1        dc.b    27,"cProp Gadget",0
  839. grou3        dc.b    27,"cGroup",0
  840. imag2        dc.b    "Images",0
  841. stan2        dc.b    "Standard Images",0
  842. arro1        dc.b    "ArrowUp:",0
  843. arro2        dc.b    "ArrowDown:",0
  844. arro3        dc.b    "ArrowLeft:",0
  845. arro4        dc.b    "ArrowRight:",0
  846. radi1        dc.b    "RadioButton:",0
  847. file1        dc.b    "File:",0
  848. hard1        dc.b    "HardDisk:",0
  849. disk1        dc.b    "Disk:",0
  850. chip1        dc.b    "Chip:",0
  851. draw1        dc.b    "Drawer:",0
  852. scal1        dc.b    "Scale Engine",0
  853. tcon1        dc.b    27,"c",27,"8MUI - ",27,"bM",27,"nagic",27,"bU",27,"nser",27,"bI",27,"nnterface",10,"written 1992-95 by Stefan Stuntz",0
  854. avad1        dc.b    "Available Demos",0
  855. grou4        dc.b    "Groups",0
  856. fram2        dc.b    "Frames",0
  857. back2        dc.b    "Backfill",0
  858. noti2        dc.b    "Notify",0
  859. list2        dc.b    "Listviews",0
  860. cycl3        dc.b    "Cycle",0
  861. imag3        dc.b    "Images",0
  862. stri3        dc.b    "Strings",0
  863. quit1        dc.b    "Quit",0
  864.  
  865. erro1        dc.b    "Failed to create application. MUI Error: %d",10,0
  866. gads1        dc.b    "OK",0
  867. muid1        dc.b    "MUI-Demo",10,"© 1992-95 by Stefan Stuntz",0
  868.  
  869.  
  870. **
  871. ** A little array definition:
  872. **
  873.         cnop    0,4
  874.  
  875. LVT_Brian    dc.l    str1,str2,str3,str4,str5,str6,str7,str8,str9,str10
  876.         dc.l    str11,str12,str13,str14,str15,str16,str17,str18,str19,str20
  877.         dc.l    str21,str22,str23,str24,str25,str26,str27,str28,str29,str30
  878.         dc.l    str31,str32,str33,str34,str35,str36,str37,str38,str39,str40
  879.         dc.l    str41,str42,str43,str44,str45,str46,str47,NULL
  880. str1        dc.b    "Cheer up, Brian. You know what they say.",0
  881. str2        dc.b    "Some things in life are bad,",0
  882. str3        dc.b    "They can really make you mad.",0
  883. str4        dc.b    "Other things just make you swear and curse.",0
  884. str5        dc.b    "When you're chewing on life's grissle,",0
  885. str6        dc.b    "Don't grumble, give a whistle.",0
  886. str7        dc.b    "And this'll help things turn out for the best,",0
  887. str8        dc.b    "And...",0
  888. str9        dc.b    0
  889. str10        dc.b    "Always look on the bright side of life",0
  890. str11        dc.b    "Always look on the light side of life",0
  891. str12        dc.b    0
  892. str13        dc.b    "If life seems jolly rotten,",0
  893. str14        dc.b    "There's something you've forgotten,",0
  894. str15        dc.b    "And that's to laugh, and smile, and dance, and sing.",0
  895. str16        dc.b    "When you're feeling in the dumps,",0
  896. str17        dc.b    "Don't be silly chumps,",0
  897. str18        dc.b    "Just purse your lips and whistle, that's the thing.",0
  898. str19        dc.b    "And...",0
  899. str20        dc.b    0
  900. str21        dc.b    "Always look on the bright side of life, come on!",0
  901. str22        dc.b    "Always look on the right side of life",0
  902. str23        dc.b    0
  903. str24        dc.b    "For life is quite absurd,",0
  904. str25        dc.b    "And death's the final word.",0
  905. str26        dc.b    "You must always face the curtain with a bow.",0
  906. str27        dc.b    "Forget about your sin,",0
  907. str28        dc.b    "Give the audience a grin.",0
  908. str29        dc.b    "Enjoy it, it's your last chance anyhow,",0
  909. str30        dc.b    "So...",0
  910. str31        dc.b    0
  911. str32        dc.b    "Always look on the bright side of death",0
  912. str33        dc.b    "Just before you draw your terminal breath.",0
  913. str34        dc.b    0
  914. str35        dc.b    "Life's a piece of shit,",0
  915. str36        dc.b    "When you look at it.",0
  916. str37        dc.b    "Life's a laugh, and death's a joke, it's true.",0
  917. str38        dc.b    "You'll see it's all a show,",0
  918. str39        dc.b    "Keep 'em laughing as you go,",0
  919. str40        dc.b    "Just remember that the last laugh is on you.",0
  920. str41        dc.b    "And...",0
  921. str42        dc.b    0
  922. str43        dc.b    "Always look on the bright side of life !",0
  923. str44        dc.b    0
  924. str45        dc.b    "..."
  925. str46        dc.b    0
  926. str47        dc.b    "[Thanx to sprooney@unix1.tcd.ie and to M. Python]",0
  927.         even
  928.  
  929.  
  930. **
  931. ** Convetional GadTools NewMenu structures. Since I was
  932. ** too lazy to construct my own object oriented menu
  933. ** system for now, this is the only part of MUI that needs
  934. ** "gadtools.library". Well, GadTools menus aren't that bad.
  935. ** Nevertheless, object oriented menus will come soon.
  936. **
  937.  
  938. ID_ABOUT    EQU 1
  939. ID_NEWVOL    EQU 2
  940. ID_NEWBRI    EQU 3
  941.  
  942. MyMenus        dc.b    NM_TITLE,0    ;--
  943.         dc.l    projecttitle
  944.         dc.l    0
  945.         dc.w    0
  946.         dc.l    0
  947.         dc.l    0
  948.         dc.b    NM_ITEM,0    ;--
  949.         dc.l    abouttext
  950.         dc.l    aboutkey
  951.         dc.w    0
  952.         dc.l    0
  953.         dc.l    ID_ABOUT
  954.         dc.b    NM_ITEM,0    ;--
  955.         dc.l    NM_BARLABEL
  956.         dc.l    0
  957.         dc.w    0
  958.         dc.l    0
  959.         dc.l    0
  960.         dc.b    NM_ITEM,0    ;--
  961.         dc.l    quittext
  962.         dc.l    quitkey
  963.         dc.w    0
  964.         dc.l    0
  965.         dc.l    MUIV_Application_ReturnID_Quit
  966.  
  967.         dc.l    NM_END        ;--
  968.  
  969. projecttitle    dc.b    "Project",0
  970.         even
  971. abouttext    dc.b    "About...",0
  972.         even
  973. aboutkey    dc.b    "?",0
  974. quittext    dc.b    "Quit",0
  975.         even
  976. quitkey        dc.b    "Q",0
  977.  
  978.  
  979. **
  980. ** Here are all the little info texts
  981. ** that appear at the top of each demo window.
  982. **
  983.  
  984. IN_Master    dc.b    9,"Welcome to the MUI demonstration program. This little toy will show you how easy it is to create graphical user interfaces with MUI and how powerful the results are."
  985.         dc.b    10,9,"MUI is based on BOOPSI, Amiga's basic object oriented programming system. For details about programming, see the 'ReadMe' file and the documented source code of this demo. Only one thing so far: it's really easy!"
  986.         dc.b    10,9,"Now go on, click around and watch this demo. Or use your keyboard (TAB, Return, Cursor-Keys) if you like that better. Hint: play around with the MUI preferences program and customize every pixel to fit your personal taste.",0
  987.         even
  988. IN_Notify    dc.b    9,"MUI objects communicate with each other with the aid of a broadcasting system. This system is frequently used in every MUI application. Binding an up and a down arrow to a prop gadget e.g. makes up a scrollbar, "
  989.         dc.b    "binding a scrollbar to a list makes up a listview. You can also bind windows to buttons, thus the window will be opened when the button is pressed."
  990.         dc.b    10,9,"Remember: The main loop of this demo program simply consists of a Wait(). Once set up, MUI handles all user actions concerning the GUI automatically.",0
  991.         even
  992. IN_Frames    dc.b    9,"Every MUI object can have a surrounding frame. Several types are available, all adjustable with the preferences program.",0
  993.         even
  994. IN_Images    dc.b    9,"MUI offers a vector image class, that allows images to be zoomed to any dimension. Every MUI image is transformed to match the current screens colors before displaying."
  995.         dc.b    10,9,"There are several standard images for often used GUI components (e.g. Arrows). These standard images can be defined via the preferences program.",0
  996.         even
  997. IN_Groups    dc.b    9,"Groups are very important for MUI. Their combinations determine how the GUI will look. A group may contain any number of child objects, which are positioned either horizontal or vertical."
  998.         dc.b    10,9,"When a group is layouted, the available space is distributed between all of its children, depending on their minimum and maximum dimensions and on their weight."
  999.         dc.b    10,9,"Of course, the children of a group may be other groups. There are no restrictions.",0
  1000.         even
  1001. IN_Backfill    dc.b    9,"Every object can have his own background, if it wants to. MUI offers several standard backgrounds (e.g. one of the DrawInfo pens or one of the rasters below)."
  1002.         dc.b    10,"The prefs program allows defining a large number of backgrounds... try it!",0
  1003.         even
  1004. IN_Listviews    dc.b    9,"MUI's list class is very flexible. A list can be made up of any number of columns containing formatted text or even images. Several subclasses of list class (e.g. a directory class and a volume class) are available. "
  1005.         dc.b    "All MUI lists hav the capability of multi selection, just by setting a single flag."
  1006.         dc.b    10,9,"The small info texts at the top of each demo window are made with floattext class. This one just needs a character string as input and formats the text according to its width.",0
  1007.         even
  1008. IN_Cycle    dc.b    9,"Cycle gadgets, radios buttons and simple lists can be used to let the user pick exactly one selection from a list of choices. In this example, all three possibilities are shown. Of course they are connected via broadcasting, "
  1009.         dc.b    "so every object will immediately be notified and updated when necessary.",0
  1010.         even
  1011. IN_String    dc.b    9,"Of course, MUI offers a standard string gadget class for text input. The gadget in this example is attached to the list, you can control the list cursor from within the gadget.",0
  1012.         even
  1013.  
  1014.  
  1015. **
  1016. ** These are the entries for the cycle gadgets and radio buttons.
  1017. **
  1018.  
  1019. CYA_Computer    dc.l    st11,st12,st13,st14,st15,st16,st17,st18,st19,NULL
  1020. st11        dc.b    "Amiga 500",0
  1021. st12        dc.b    "Amiga 600",0
  1022. st13        dc.b    "Amiga 1000 :)",0
  1023. st14        dc.b    "Amiga 1200",0
  1024. st15        dc.b    "Amiga 2000",0
  1025. st16        dc.b    "Amiga 3000",0
  1026. st17        dc.b    "Amiga 4000",0
  1027. st18        dc.b    "Amiga 4000T",0
  1028. st19        dc.b    "Atari ST :(",0
  1029.         even
  1030.  
  1031. CYA_Printer    dc.l    st21,st22,st23,NULL
  1032. st21        dc.b    "HP Deskjet",0
  1033. st22        dc.b    "NEC P6",0
  1034. st23        dc.b    "Okimate 20",0
  1035.         even
  1036.  
  1037. CYA_Display    dc.l    st31,st32,st33,NULL
  1038. st31        dc.b    "A1081",0
  1039. st32        dc.b    "NEC 3D",0
  1040. st33        dc.b    "A2024",0
  1041. st44        dc.b    "Eizo T660i",0
  1042.  
  1043.  
  1044.         include    "libraries/mui_asm.i"
  1045.  
  1046.         even
  1047.  
  1048.  
  1049. **
  1050. ** For every object we want to refer later (e.g. for broadcasting purposes)
  1051. ** we need a pointer.
  1052. **
  1053.  
  1054. AP_Demo        dc.l    0
  1055.  
  1056. WI_Master    dc.l    0
  1057. WI_Frames    dc.l    0
  1058. WI_Images    dc.l    0
  1059. WI_Notify    dc.l    0
  1060. WI_Listviews    dc.l    0
  1061. WI_Groups    dc.l    0
  1062. WI_Backfill    dc.l    0
  1063. WI_Cycle    dc.l    0
  1064. WI_String    dc.l    0
  1065.  
  1066. BT_Notify    dc.l    0
  1067. BT_Frames    dc.l    0
  1068. BT_Images    dc.l    0
  1069. BT_Groups    dc.l    0
  1070. BT_Backfill    dc.l    0
  1071. BT_Listviews    dc.l    0
  1072. BT_Cycle    dc.l    0
  1073. BT_String    dc.l    0
  1074. BT_Quit        dc.l    0
  1075.  
  1076. PR_PropA    dc.l    0
  1077. PR_PropH    dc.l    0
  1078. PR_PropV    dc.l    0
  1079. PR_PropL    dc.l    0
  1080. PR_PropR    dc.l    0
  1081. PR_PropT    dc.l    0
  1082. PR_PropB    dc.l    0
  1083.  
  1084. LV_Volumes    dc.l    0
  1085. LV_Directory    dc.l    0
  1086. LV_Computer    dc.l    0
  1087. LV_Brian    dc.l    0
  1088.  
  1089. CY_Computer    dc.l    0
  1090. CY_Printer    dc.l    0
  1091. CY_Display    dc.l    0
  1092.  
  1093. MT_Computer    dc.l    0
  1094. MT_Printer    dc.l    0
  1095. MT_Display    dc.l    0
  1096.  
  1097. ST_Brian    dc.l    0
  1098.  
  1099. GA_Gauge1    dc.l    0
  1100. GA_Gauge2    dc.l    0
  1101. GA_Gauge3    dc.l    0
  1102.  
  1103. BP_Wheel    dc.l    0
  1104.  
  1105.  end
  1106.